package com.example.bbbb.funIn;

import java.util.function.Supplier;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ws
 * Date: 2023-12-15
 * Time: 13:45
 */
public class Supp {
    public static void main(String[] args) {
        // 供给型接口
//        Supplier<Person> supplier = new Supplier<Person>() {
//            @Override
//            public Person get() {
//                return new Person();
//            }
//        };

        Supplier<Person> supplier = () -> {
          return new Person();
        };

        System.out.println(supplier.get().name);
    }
}
